import { ApiProperty, PartialType } from '@nestjs/swagger';
import { CreateRoleDto } from './create-role.dto';
import { IsNotEmpty, IsOptional } from 'class-validator';

export class UpdateRoleDto extends PartialType(CreateRoleDto) {
	@ApiProperty({
		required: true,
		description: '角色名称',
	})
	@IsNotEmpty()
	name: string;

	@ApiProperty({
		required: false,
		description: '角色说明',
	})
	@IsOptional()
	description: string;
}
